<?php
// 这个文件是创建完红包之后的回调用于记录单号
require_once 'config.php';
require_once 'MysqliDb.php';
require_once 'HttpRequst.php';

$db = new MysqliDb ($configDb);
$crowdNo=  HttpRequest::getRequest ( "crowdNo" );
$db->where ('crowd_no', $crowdNo);
$results = $db->getOne('crowd');
if(empty($results)){
	if (!empty($crowdNo)) {
		$t=time();
		$data=Array(
			"crowd_no"=>$crowdNo,
			"status"=>1,
			"create_time"=>$t
		);
		$id = $db->insert ('crowd', $data);
		if ($id){
			echo "创建成功";
		}
	}
	
}